<template>
	<div class="public-attribute">
		
		<div class="header-fixed">
			<hot-header></hot-header>
			<hot-nav></hot-nav>
		</div>
		
		<hot-list 
				:hotList='hotList'
		>
		</hot-list>
		
	</div>
</template>

<script>
	import axios from 'axios'
	import HotHeader from '../../common/CommonHeader'
	import HotNav from '../../common/CommonNav'
	import HotList from './components/List'
	export default {
		name: 'hot',
		components: {
			HotHeader,
			HotNav,
			HotList
		},
		data () {
			return {
				hotList: []
			}
		},
		methods: {
			getHotData () {
				axios({
					method: 'get',
					url: '/hot_lists?module=hot'
				})
				.then( response=> {	
					let res = response.data
					if (res.status == 0) {
						this.hotList = res.data.splice(0, 7)
					}
				})
				.catch( err=> {
					console.log('HOT REQUEST ERROR:' + err)
				})
			}
		},
		mounted () {
			this.getHotData()
		}
	}
</script>